package org.lanqiao.webfm.model;


import java.util.*;
import java.io.Serializable;
import java.sql.*;
import java.lang.reflect.*;

import javacommon.base.*;
import javacommon.ijdbc.*;
import javacommon.util.*;
import javacommon.web.page.*;

import org.lanqiao.webfm.model.*;
import org.slf4j.*;

/**
*@Author zhengwei
**/
public class TypeMapper implements RowMapper<Type>{
	public Type mapRow(ResultSet rs) throws SQLException {
		Type model = new Type();
		model.setId(rs.getLong("ID"));
		model.setName(rs.getString("NAME"));
		model.setDescp(rs.getString("DESCP"));
		model.setPid(rs.getLong("PID"));
		
		try {
			Type pType = model.getType();
			pType.setId(rs.getLong("PTYPEID"));
			pType.setName(rs.getString("PTYPENAME"));
		} catch (Exception e) {
			//e.printStackTrace();
		}
		return model;
	}
}